<?php
session_start();
require_once '../coneccion.php';

$id = $_REQUEST["id"];
$usuario = $_REQUEST["usuario"];
$contraseña = $_REQUEST["password"];
$nueva_c = $_REQUEST["nueva_c"];

$sql= "select * from usuarios where user='$usuario' and password='$contraseña'";

$rs = mysql_query($sql) or die(mysql_error());
$totalReg = 0;
$totalReg = mysql_num_rows($rs);
if($totalReg>0){
    while($fila	=	mysql_fetch_assoc($rs)){
      


$sql1= "update usuarios set password='$nueva_c' where user='$usuario'";

mysql_query($sql1) or die(mysql_error());
?>
1


    
  <?php  }
   
}else {?> 
  2
    
<?php    
}
?> 


